package com.wangzhen.abstractroutingdatasource.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

/**
 * 多数据源配置项
 */
@Component
@ConfigurationProperties(prefix = "spring.datasource")
public class DataSourceProperties {

    private List<Map<String,String>> masters;

    private List<Map<String,String>> slaves;

    public List<Map<String, String>> getMasters() {
        return masters;
    }

    public List<Map<String, String>> getSlaves() {
        return slaves;
    }

    public void setMasters(List<Map<String, String>> masters) {
        this.masters = masters;
    }

    public void setSlaves(List<Map<String, String>> slaves) {
        this.slaves = slaves;
    }
}